import Vue from 'vue'
import Router from 'vue-router'
import Element from 'element-ui'

import login from '@/components/login'    // 登陆


import home from '@/components/home'    // 首页
import autotrophy from '@/components/autotrophy'    // 自营商城
import financial from '@/components/financial'    // 塑云金融
import customer from '@/components/customer'    // 客户资源
import technician from '@/components/technician'    // 技术专家
import information from '@/components/information'    // 资讯中心
import auction from '@/components/auction'    // 竞价专区
import properties from '@/components/properties'    // 物性库

import companycenter from '@/components/companycenter'    // 企业中心

import myorder from '@/components/myorder'    // 我的订单
import bidding from '@/components/bidding'    // 我的竞价


import 'element-ui/lib/theme-default/index.css'
Vue.use(Element)
Vue.use(Router)

export default new Router({
  mode: 'history',//可以是去掉#号

  routes: [
   
    {
      path: '/',
      name: 'home',
      component: Home
    },
    // 自营商城
    {
      path: '/autotrophy',
      name: 'autotrophy',
      component: autotrophy
    },
    // 塑云金融
    {
      path: '/financial',
      name: 'financial',
      component: financial
    },
    // 客户资源
    {
      path: '/customer',
      name: 'customer',
      component: customer
    },
    // 技术专家
    {
      path: '/technician',
      name: 'technician',
      component: technician
    },
    // 资讯中心
    {
      path: '/information',
      name: 'information',
      component: information
    },
    // 竞价专区
    {
      path: '/auction',
      name: 'auction',
      component: auction
    },
    // 物性库
    {
      path: '/properties',
      name: 'properties',
      component: properties
    },
    // 登录
    {
      path: '/login',
      name: 'login',
      component: login
    },
    // 企业中心
    {
      path: '/companycenter',
      name: 'companycenter',
      component: companycenter,
      children:[
      // 默认我的订单
        {
          path:'',
          name:'myorder',
          component:myorder
        },
      // 我的订单
        {
          path:'/companycenter/myorder',
          name:'myorder',
          component:myorder
        },
        // 我的竞价
        {
          path:'/companycenter/bidding',
          name:'bidding',
          component:bidding
        }
      ]
    },

  ]
})
